<?php
require_once('lib/PHPTemplateView.inc');
define('__DEBUG__', 1);

abstract class PHPBaseDoc
{
	private $m_view;

	public function GetView()
	{
		return $this->m_view;
	}	

	function GetInfo()
	{
	}

	public function GetContent($cid, &$cs)
	{
		print $cid;
	}

	public function __construct($template)
	{
		$this->m_view = new PHPTemplateView("D:/Data/Web/localhost/TemplateEngineClient/Templates/", $template, $this);
	}
}

final class doc extends PHPBaseDoc
{
	public function GetContent($cid, &$cs)
	{
		switch($cid)
		{
			case '0.repeat1_main':
			return 3;

			case '0.repeat1_main.print':
				printf("printting:%u   ", $cs['n']);
			break;

			default:
				parent::GetContent($cid, $cs);
		};
	}

	public function doc()
	{
		parent::__construct('test_CondContainers.html');
	}
};

$doc = new doc();
$doc->GetView()->render();
?>